2020-2021 Sunseeker Telemetry and Lighting System
comp_b_ex5_TAx.c File Reference
#include "driverlib.h"

Go to the source code of this file.

Macros

#define TIMER_A_PERIOD   0xFFFF
 
#define UCS_MCLK_DESIRED_FREQUENCY_IN_KHZ   12000
 
#define UCS_MCLK_FLLREF_RATIO   374
 

Functions

void main (void)
 
void TIMER_A (void)
 

Variables

Timer_A_initUpModeParam initUpModeParam = {0}
 

Macro Definition Documentation

◆ TIMER_A_PERIOD

#define TIMER_A_PERIOD   0xFFFF

COMPB - TA0.1, TA1.1, Varying duty cycle of input voltage

Use CompB to determine if input, Vcompare has a duty cycle greater than 50%. When Vcompare exceeds Vcc*3/4 then TimerA0 captures the time (TA0CCR1). When Vcompare is less than Vcc*1/4 then TimerA1 captures the time (TA1CCR1) and resets the timers for TIMERA0 and TIMERA1. If TA0CCR1 is greater than TA1CCR1/2, then turn on the LED. If TA0CCR1 is less than TA1CCR1/2, then turn off the LED. Clocks: ACLK = REFO; MCLK = SMCLK = 12MHz

       MSP430x552x
   ------------------

/|| | | | | –|RST P6.0/CB0|<- Vcompare (200Hz<f<1Mhz) (vary dutycycle) | P1.0|-> LED ('ON' if dutycycle > 50%; | | 'OFF' if dutycycle < 50%)

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

  • COMPB peripheral
  • GPIO Port peripheral
  • CB0

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

  • TIMER1_A1_VECTOR

Definition at line 67 of file comp_b_ex5_TAx.c.

◆ UCS_MCLK_DESIRED_FREQUENCY_IN_KHZ

#define UCS_MCLK_DESIRED_FREQUENCY_IN_KHZ   12000

Definition at line 68 of file comp_b_ex5_TAx.c.

◆ UCS_MCLK_FLLREF_RATIO

#define UCS_MCLK_FLLREF_RATIO   374

Definition at line 69 of file comp_b_ex5_TAx.c.

Function Documentation

◆ main()

◆ TIMER_A()

void TIMER_A ( void  )

Variable Documentation

◆ initUpModeParam

Timer_A_initUpModeParam initUpModeParam = {0}

Definition at line 71 of file comp_b_ex5_TAx.c.

Referenced by main(), and TIMER_A().